﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="wfrmInformacionClientesVisitar.aspx.cs" Inherits="proyGestionVisitas.Gestion.wfrmInformacionClientesVisitar" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        #principal
        {
            width: 100% !important;
            margin: 0 auto !important;
        }
        .filas
        {
            padding: 0.5em 0.75em !important;
        }
        #izq
        {
            float: left !important;
        }
        #der
        {
            float: right !important;
        }
        #izq, #der
        {
            width: 49% !important;
        }
        .col_izq
        {
            width: 75px;
        }
        .contenido
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="principal">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" HeaderText="Información de Clientes a Visitar">
                    <PanelCollection>
                        <dx:PanelContent>
                            <div id="contenido">
                                <div id="izq">
                                    <table width="100%">
                                        <tr>
                                            <td class="filas col_izq">
                                                <dx:ASPxLabel ID="lblServicios" runat="server" Text="Servicios">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td colspan="4" class="filas">
                                                <dx:ASPxComboBox ID="cboServicios" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                                    Width="100%" AutoPostBack="true" OnValueChanged="cboServicios_ValueChanged">
                                                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxComboBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="filas col_izq">
                                                <dx:ASPxLabel ID="lblPresupuesto" runat="server" Text="Presupuesto">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxTextBox ID="txtPresupuestoIni" runat="server" Width="100px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxLabel ID="lblHasta01" runat="server" Text="hasta">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxTextBox ID="txtPresupuestoFin" runat="server" Width="100px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxComboBox ID="cboTipoPresupuesto" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                                    Width="100px" SelectedIndex="0">
                                                    <Items>
                                                        <dx:ListEditItem Selected="True" Text="Dolares" Value="0" />
                                                        <dx:ListEditItem Text="Soles" Value="1" />
                                                    </Items>
                                                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxComboBox>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div id="der">
                                    <table width="100%">
                                        <tr>
                                            <td class="filas col_izq">
                                                <dx:ASPxLabel ID="lblProductos" runat="server" Text="Productos">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td colspan="4" class="filas">
                                                <dx:ASPxComboBox ID="cboProductos" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                                    Width="100%">
                                                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxComboBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="filas col_izq">
                                                <dx:ASPxLabel ID="lblEsfuerzo" runat="server" Text="Esfuerzo">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxTextBox ID="txtEsfuerzoIni" runat="server" Width="100px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxLabel ID="lblHasta02" runat="server" Text="hasta">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxTextBox ID="txtHastaFin" runat="server" Width="100px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td class="filas">
                                                <dx:ASPxComboBox ID="cboTipoEsfuerzo" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                                    Width="100px" SelectedIndex="0">
                                                    <Items>
                                                        <dx:ListEditItem Selected="True" Text="Meses" Value="0" />
                                                        <dx:ListEditItem Text="Dias" Value="1" />
                                                    </Items>
                                                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <ValidationSettings>
                                                        <ErrorFrameStyle ImageSpacing="4px">
                                                            <ErrorTextPaddings PaddingLeft="4px" />
                                                        </ErrorFrameStyle>
                                                    </ValidationSettings>
                                                </dx:ASPxComboBox>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div style="clear: both">
                                </div>
                                <table width="100%">
                                    <tr>
                                        <td align="right" class="filas">
                                            <dx:ASPxButton ID="btnBuscar" runat="server" Text="Procesar" Width="100px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                                OnClick="btnBuscar_Click">
                                            </dx:ASPxButton>
                                        </td>
                                        <td align="left" class="filas">
                                            <dx:ASPxButton ID="btnNada" runat="server" Text="Buscar" ClientVisible="false" Width="100px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                            </dx:ASPxButton>
                                        </td>
                                    </tr>
                                </table>
                                <table width="100%">
                                    <tr>
                                        <td class="filas">
                                            <dx:ASPxGridView ID="dgvClientesAVisitar" runat="server" Width="100%" AutoGenerateColumns="False" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" KeyFieldName="nu_ruc"
                                                OnAfterPerformCallback="dgvClientesAVisitar_AfterPerformCallback" OnPageIndexChanged="dgvClientesAVisitar_PageIndexChanged">
                                                <Columns>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="0" Caption="RUC" FieldName="nu_ruc">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="1" Caption="RAZON SOCIAL" FieldName="no_razon_social">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="2" Caption="SERVICIO" FieldName="no_servicio">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="3" Caption="PRODUCTO" FieldName="no_producto">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="4" Caption="PRESUPUESTO" FieldName="qt_monto_base">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="5" Caption="MONEDA" FieldName="Moneda">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="6" Caption="ESFUERZO" FieldName="Esfuerzo">
                                                        <PropertiesTextEdit DisplayFormatString="##0.00">
                                                        </PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="7" Caption="TIEMPO" FieldName="Tiempo">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="ESTADO" FieldName="no_opor_estado" ShowInCustomizationForm="True" VisibleIndex="9">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="8" Caption="RUBRO" FieldName="no_rubro_comercial">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="co_servicio" ShowInCustomizationForm="True" Visible="False" VisibleIndex="12">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="co_producto" ShowInCustomizationForm="True" Visible="False" VisibleIndex="13">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="co_presupuesto" ShowInCustomizationForm="True" Visible="False" VisibleIndex="11">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="ACCIONES" ShowInCustomizationForm="True" VisibleIndex="10" Width="100px">
                                                        <DataItemTemplate>
                                                            <dx:ASPxHyperLink ID="lnkEditar" runat="server" NavigateUrl='<%# String.Format("~/Gestion/wfrmInformacionClientesVisitarActualizar.aspx?id=2&nr={0}&cs={1}&cp={2}&cps={3}", Eval("nu_ruc"), Eval("co_servicio"), Eval("co_producto"), Eval("co_presupuesto")) %>'
                                                                Text="Editar" />
                                                        </DataItemTemplate>
                                                        <CellStyle HorizontalAlign="Center">
                                                        </CellStyle>
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <SettingsPager ShowDefaultImages="False">
                                                    <AllButton Text="All">
                                                    </AllButton>
                                                    <NextPageButton Text="Next &gt;">
                                                    </NextPageButton>
                                                    <PrevPageButton Text="&lt; Prev">
                                                    </PrevPageButton>
                                                </SettingsPager>
                                                <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                                    <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif">
                                                    </LoadingPanelOnStatusBar>
                                                    <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </Images>
                                                <ImagesFilterControl>
                                                    <LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                                                    </LoadingPanel>
                                                </ImagesFilterControl>
                                                <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
                                                    <Header ImageSpacing="10px" SortingImageSpacing="10px">
                                                    </Header>
                                                </Styles>
                                                <StylesEditors>
                                                    <CalendarHeader Spacing="11px">
                                                    </CalendarHeader>
                                                    <ProgressBar Height="25px">
                                                    </ProgressBar>
                                                </StylesEditors>
                                            </dx:ASPxGridView>
                                        </td>
                                        <td class="filas">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="PopUp">
                                <dx:ASPxPopupControl ID="pcMensaje" runat="server" AllowDragging="True" ClientInstanceName="pcMensaje" CloseAction="CloseButton" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                    CssPostfix="PlasticBlue" HeaderText="Mensaje" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ShowPageScrollbarWhenModal="True" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                    Width="400px" RenderMode="Lightweight">
                                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                                    </LoadingPanelImage>
                                    <CloseButtonStyle>
                                        <Paddings Padding="0px" />
                                    </CloseButtonStyle>
                                    <ContentStyle>
                                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                                    </ContentStyle>
                                    <HeaderStyle>
                                        <Paddings PaddingBottom="6px" PaddingLeft="15px" PaddingRight="6px" PaddingTop="3px" />
                                    </HeaderStyle>
                                    <ContentCollection>
                                        <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
                                            <table align="center" width="100%">
                                                <tr>
                                                    <td align="center" colspan="2" class="filas">
                                                        <dx:ASPxLabel ID="lblmenOK" runat="server">
                                                        </dx:ASPxLabel>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="filas">
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="center" class="filas">
                                                        <dx:ASPxButton ID="btnAceptarOK" runat="server" AutoPostBack="False" CausesValidation="False" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                                            Text="Aceptar" Width="100px">
                                                            <ClientSideEvents Click="function(s, e) { pcMensaje.Hide(); }" />
                                                        </dx:ASPxButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </dx:PopupControlContentControl>
                                    </ContentCollection>
                                </dx:ASPxPopupControl>
                            </div>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxRoundPanel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
